<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="8">
            <a-form-model-item label="APPID" prop="appId">
              <a-input v-model="form.appId" placeholder="请输入APP ID" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="APP名称" prop="appName">
              <a-input v-model="form.appName" placeholder="请输入APP名称" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="更新描述" prop="describes">
              <a-input v-model="form.describes" placeholder="请输入更新描述" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="APP地址" prop="editionUrl">
              <a-input v-model="form.editionUrl" placeholder="请输入APP地址" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item
              label="是否强制更新 0代表否 1代表是"
              prop="editionForce"
            >
              <a-input
                v-model="form.editionForce"
                placeholder="请输入是否强制更新 0代表否 1代表是"
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="是否发行  0否 1是" prop="editionIssue">
              <a-input
                v-model="form.editionIssue"
                placeholder="请输入是否发行  0否 1是"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="整包升级  0否 1是" prop="packageType">
              <a-input
                v-model="form.packageType"
                placeholder="请输入是否发行  0否 1是"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="版本号" prop="editionNumber">
              <a-input v-model="form.editionNumber" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item
              label="版本名称 manifest里的版本名称"
              prop="editionName"
            >
              <a-input
                v-model="form.editionName"
                placeholder="请输入版本名称 manifest里的版本名称"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item
              label="是否静默更新 0代表否 1代表是"
              prop="editionSilence"
            >
              <a-input
                v-model="form.editionSilence"
                placeholder="请输入是否静默更新 0代表否 1代表是"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="排序" prop="sort">
              <a-input-number
                v-model="form.sort"
                :min="0"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizAppVersionEditForm from "./BizAppVersionForm";
export default {
  ...BizAppVersionEditForm,
};
</script>
